<?php
	####################################################
	# library import and object instance.              #
	####################################################
	include_once('./common.php');
	include_once('./ncrud_common.php');


	####################################################
	# request data($_POST AND $_GET FROM $_REQUEST)    #
	####################################################
	# REQUEST(get and post variables)

	# GET(url variables)

	# POST(form variables)

	# Validation(special case validate)

	####################################################
	# implementation                                   #
	####################################################
?>
<?php
	$html->custom_header(TITLE);
	$html->custom_js("{$JS}jquery.1.7.1.min.js");
	$html->custom_js("{$JS}lib.control.js");
	$html->custom_css("{$CSS}basic.css");
?>
<script type="text/javascript" language="javascript">
//<![CDATA[
	var PageAction = {
		validate:function(){
			//*/
			var check = [
				Validation.check_is_null("#bname", "이름을 입력 하세요."),
				Validation.check_is_null("#bname_eng", "이름(영문)을 입력 하세요."),
				Validation.check_is_do_not_chooesed("benable", "활성을 선택 하세요."),
				Validation.check_is_null_textarea("#bdesc", "데스크립션을 입력 하세요.")
			];
			return Validation.check(check);
			//*/
		}
	}
//]]>
</script>
<?$html->custom_body();?>
<?=$tmp->tiles_header()?>
	<h1>ncrud - create</h1>
	<form id="formx" name="formx" method="post" action="./ncrud_create_proc.php" onsubmit="return PageAction.validate();">
		<table width="100%" border="1" cellspacing="3" cellpadding="0">
			<tr>
				<th>
					이름(bname)
				</th>
				<td>
					<input type="text" name="bname" id="bname" maxlength="40" value="" />
				</td>
			</tr>
			<tr>
				<th>
					이름-영문(bname_eng)
				</th>
				<td>
					<input type="text" name="bname_eng" id="bname_eng" />
				</td>
			</tr>
			<tr>
				<th>
					활성(benable)
				</th>
				<td>
					<label>
						<input type="radio" name="benable" id="benable1" value="Y" /> Y
					</label>
					<label>
						<input type="radio" name="benable" id="benable2" value="N" /> N
					</label>
				</td>
			</tr>
			<tr>
				<th>
					데스크립션(bdesc)
				</th>
				<td>
					<textarea id="bdesc" name="bdesc" rows="5" cols="80"></textarea>
				</td>
			</tr>
			<tr>
				<th colspan="2">
					<?=NTool::submit_btn();?>
				</th>
			</tr>
		</table>
	</form>
	<?=NTool::btn("리스트", "Mover.href('./ncrud_list.php');");?>
	<span> | </span>
	<?=NTool::btn("뒤로", "Mover.back();");?>
	<?=NTool::btn("인덱스", "Mover.home();");?>
<?=$tmp->tiles_footer()?>
<?php $html->html_footer(); ?>